package com.xinqi.modules.homework.homework.domain;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xinqi.common.mybatis.data.entity.BaseEntity;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 课程作业配置表实体层
 *
 * @author: system
 * @date: 2023/03/09
 */
@Setter
@Getter
@TableName("co_course_homework")
public class CourseHomeworkEntity extends BaseEntity {

    public CourseHomeworkEntity() {
    }

    ;

    public CourseHomeworkEntity(Long id, Integer status) {
        this.id = id;
        this.status = status;
    }

    /**
     * 主键
     */
    @TableField(value = "id")
    private Long id;
    /**
     * 创建用户ID
     */
    @TableField(value = "user_id")
    private Long userId;
    /**
     * 标题
     */
    @TableField(value = "title")
    private String title;
    /**
     * 详情内容
     */
    @TableField(value = "content", updateStrategy = FieldStrategy.IGNORED)
    private String content;
    /**
     * 附件
     */
    @TableField(value = "fileurls")
    private String fileurls;
    /**
     * 视频j集合
     */
    @TableField(value = "videos")
    private String videos;
    /**
     * 图片集合
     */
    @TableField(value = "images")
    private String images;
    /**
     * 课程ID
     */
    @TableField(value = "course_id")
    private Long courseId;
    /**
     * 班级ID
     */
    @TableField(value = "class_id")
    private Long classId;
    /**
     * 章节ID
     */
    @TableField(value = "chapter_id")
    private Long chapterId;
    /**
     * 是否同步发布到班级 0否 1是
     */
    @TableField(value = "synchro")
    private Integer synchro;
    /**
     * 同步的班级id用，隔开
     */
    @TableField(value = "class_ids", updateStrategy = FieldStrategy.IGNORED)
    private String classIds;
    /**
     * 作业类型(1个人作业2小组作业)
     */
    @TableField(value = "task_type")
    private Integer taskType;
    /**
     * 小组作业小组id JSON格式
     */
    @TableField(value = "group_ids", updateStrategy = FieldStrategy.IGNORED)
    private String groupIds;
    /**
     * 超时允许提交 (作业字段)
     */
    @TableField(value = "limit_status")
    private Integer limitStatus;
    /**
     * 是否开启查重
     */
    @TableField(value = "check_duplicate")
    private Integer checkDuplicate;
    /**
     * 查重警戒值
     */
    @TableField(value = "warning_value")
    private Integer warningValue;
    /**
     * 超过警戒值打回(0否1是)
     */
    @TableField(value = "repulse")
    private Integer repulse;
    /**
     * 重复率上限
     */
    @TableField(value = "repetition_rate")
    private Integer repetitionRate;
    /**
     * 是否开启重复(0否1是)
     */
    @TableField(value = "is_repeat")
    private Integer isRepeat;
    /**
     * 重复次数 //元天数字段 (作业)
     */
    @TableField(value = "repeat_day")
    private Integer repeatDay;
    /**
     * 已重复发送次数 //原天数字段 （作业字段）
     */
    @TableField(value = "repeated_day")
    private Integer repeatedDay;
    /**
     * 是否立即发布，0否  1是
     */
    @TableField(value = "now_release")
    private Integer nowRelease;
    /**
     * 定时发布，0不定时 1定时
     */
    @TableField(value = "timing")
    private Integer timing;
    /**
     * 发布时间
     */
    @TableField(value = "release_time")
    private LocalDateTime releaseTime;
    /**
     * 截止时间(各种类型结束时间)
     */
    @TableField(value = "end_time")
    private LocalDateTime endTime;
    /**
     * 发布状态 1未发布 2定时发布 3已发布 4已结束 5已开始
     */
    @TableField(value = "status")
    private Integer status;
    /**
     * 作业总分
     */
    @TableField(value = "score")
    private BigDecimal score;
    /**
     * 额外字段
     */
    @TableField(value = "extra")
    private String extra;

    /**
     * 批次号，不同轮数作业属于统一批次
     */
    @TableField(value = "batch_num")
    private Long batchNum;

    /**
     * 作业轮数,第几轮
     */
    @TableField(value = "curr_repeat_day")
    private Integer currRepeatDay;
}
